import { request } from 'umi';
import { ModuleData } from '@/pages/Account/Open/data';

export async function accountOpen(): Promise<{ data: ModuleData }> {
  return request('/v2/enterprise/module', {
    method: 'GET',
  });
}

export async function accountOpenSave(params: any) {
  return request<API.Result<void>>('/v2/enterprise/module', {
    method: 'PUT',
    data: params,
  });
}

export async function accountOpenPay(params: any) {
  return request<API.Result<void>>('/v2/enterprise/pay', {
    method: 'PUT',
    data: params,
  });
}
export async function accountOpenPayStatus(params: string) {
  return request<API.Result<void>>('/v2/enterprise/pay-status/' + params, {
    method: 'GET',
  });
}
